package com.ysd.controller;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.ysd.entity.Product;
import com.ysd.service.ProducrService;
@Controller
public class ProductController {
	@Autowired
	private ProducrService ProductService;
	@RequestMapping("getproduct")
	@ResponseBody
	public Product getProduct(Integer id){
		Product p=ProductService.getProduct(2);
		return p;
		
	}
}
